import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Date;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author WHQ
 * @version 1.0
 * @date 2022-3-28 0028 下午 7:21
 */
public class Demo {

    public static void main(String[] args) throws IOException, Exception {
//        Class clazz = Class.forName("org.java.test.Account");
        //通过class对象得到对象
//        Object obj = clazz.newInstance();
//        Method method = clazz.getDeclaredMethod("show");
        //得到构造函数
//        Constructor constructor = clazz.getConstructor();
        //通过构造函数得到实例
//        Object o = constructor.newInstance();
        //开始执行方法
//        method.invoke(obj);
//        org.java.test.Account account=new org.java.test.Account();
//        ExecutorService executorService = Executors.newFixedThreadPool(1);
////        for (int i = 1; i <= 1; i++) {
//            executorService.submit(new AddMoneyThread(account,1));
////        }
//        executorService.shutdown();
//        while (!executorService.isTerminated()) {
//            System.out.println(account.getMoney());
//        }
//    }
//        Path initPath = Paths.get("D:\\officeSoftware\\node.js\\node-v6.4.0-win-x64\\etc");
//        Files.walkFileTree(initPath, new SimpleFileVisitor<Path>() {
//                    @Override
//                    public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
//                        System.out.println(file.getFileName().toString());
//                        return FileVisitResult.CONTINUE;
//                    }
//                }
//        );
        Integer i=100;
        Integer y=100;
        i.toString();
        System.out.println(i.equals(y));

    }
    static {
        System.out.println("静态代码块");
    }
    {
        Date date = new Date();
        System.out.println(date);
        System.out.println("代码块");
    }

}
